import time


def process_time(func):
    def wrapper(*args, **kwargs):
        start_time = time.time()
        func(*args, **kwargs)
        end_time = time.time()
        time_stamp = end_time - start_time
        print('处理用时:', time_stamp)

    return wrapper


class Student:
    def __init__(self, name):
        self.name = name

    @process_time
    def study(self):
        print('开始学习喽')
        # 睡眠两秒 模拟学习了两秒
        time.sleep(2)


student01 = Student('赵敏')
student01.study()
